package com.tmindtech.api.foodsafe

import com.tmindtech.api.foodsafe.service.FoodSafeCsvImport
import org.junit.Ignore
import org.junit.Test
import org.junit.runner.RunWith
import org.springframework.beans.factory.annotation.Autowired
import org.springframework.boot.test.context.SpringBootTest
import org.springframework.test.context.junit4.SpringRunner
import java.io.FileInputStream

/**
 * Created by RexQian on 2017/11/27.
 */

@RunWith(SpringRunner::class)
@SpringBootTest
@Ignore
class ImportFoodSafe {
    @Autowired
    lateinit var foodSafeImport: FoodSafeCsvImport

    @Test
    fun importDept() {
        foodSafeImport.importDeptCsv(
                FileInputStream("/Users/rex/temp/xianju/foodsafe/group_table.csv"))
    }

    @Test
    fun importStaff() {
        foodSafeImport.importStaffCsv(
                FileInputStream("/Users/rex/temp/xianju/foodsafe/员工信息.csv"))
    }

    @Test
    fun importPhoneGpsMap() {
        foodSafeImport.importGpsMapCsv(
                FileInputStream("/Users/rex/temp/xianju/foodsafe/gps_table.csv"))
    }

    @Test
    fun importGpsData() {
        foodSafeImport.importGpsDataCsv(
                FileInputStream("/Users/rex/temp/xianju/foodsafe/gps_inspect_upload_data.csv"))
    }
}